<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>VCVTPH2PS—Convert 16-bit FP values to Single-Precision FP values </title></head>
<body>
<h1>VCVTPH2PS—Convert 16-bit FP values to Single-Precision FP values</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op /En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>VEX.128.66.0F38.W0 1313 /r</p>
<p>VCVTPH2PS xmm1, xmm2/m64</p></td>
<td>RM</td>
<td>V/V</td>
<td>F16C</td>
<td>Convert four packed half precision (16-bit) floating-point values in xmm2/m64 to packed single-precision floating-point value in xmm1.</td></tr>
<tr>
<td>
<p>VEX.256.66.0F38.W0 1313 /r</p>
<p>VCVTPH2PS ymm1, xmm2/m128</p></td>
<td>RM</td>
<td>V/V</td>
<td>F16C</td>
<td>Convert eight packed half precision (16-bit) floating-point values in xmm2/m128 to packed single-precision floating-point value in ymm1.</td></tr>
<tr>
<td>
<p>EVEX.128.66.0F38.W0 1313 /r</p>
<p>VCVTPH2PS xmm1 {k1}{z}, xmm2/m64</p></td>
<td>HVM</td>
<td>V/V</td>
<td>
<p>AVX512VL</p>
<p>AVX512F</p></td>
<td>Convert four packed half precision (16-bit) floating-point values in xmm2/m64 to packed single-precision floating-point values in xmm1.</td></tr>
<tr>
<td>
<p>EVEX.256.66.0F38.W0 1313 /r</p>
<p>VCVTPH2PS ymm1 {k1}{z}, xmm2/m128</p></td>
<td>HVM</td>
<td>V/V</td>
<td>
<p>AVX512VL</p>
<p>AVX512F</p></td>
<td>Convert eight packed half precision (16-bit) floating-point values in xmm2/m128 to packed single-precision floating-point values in ymm1.</td></tr>
<tr>
<td>
<p>EVEX.512.66.0F38.W0 1313 /r</p>
<p>VCVTPH2PS zmm1 {k1}{z}, ymm2/m256 {sae}</p></td>
<td>HVM</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Convert sixteen packed half precision (16-bit) floating-point values in ymm2/m256 to packed single-precision floating-point values in zmm1.</td></tr></table>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>RM</td>
<td>ModRM:reg (w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr>
<tr>
<td>HVM</td>
<td>ModRM:reg (w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr></table>
<p><strong>Description</strong></p>
<p>Converts packed half precision (16-bits) floating-point values in the low-order bits of the source operand (the second operand) to packed single-precision floating-point values and writes the converted values into the destina-tion operand (the first operand).</p>
<p>If case of a denormal operand, the correct normal result is returned. MXCSR.DAZ is ignored and is treated as if it 0. No denormal exception is reported on MXCSR.</p>
<p>VEX.128 version: The source operand is a XMM register or 64-bit memory location. The destination operand is a XMM register. The upper bits (MAX_VL-1:128) of the corresponding destination register are zeroed.</p>
<p>VEX.256 version: The source operand is a XMM register or 128-bit memory location. The destination operand is a YMM register. Bits (MAX_VL-1:256) of the corresponding destination register are zeroed.</p>
<p>EVEX encoded versions: The source operand is a YMM/XMM/XMM (low 64-bits) register or a 256/128/64-bit memory location. The destination operand is a ZMM/YMM/XMM register conditionally updated with writemask k1.</p>
<p>The diagram below illustrates how data is converted from four packed half precision (in 64 bits) to four single preci-sion (in 128 bits) FP values.</p>
<p>Note: VEX.vvvv and EVEX.vvvv are reserved (must be 1111b).</p>
<svg width="594.089985" viewBox="103.440000 1005921.000010 396.059990 127.800000" height="191.7">
<text y="1005943.04178" x="194.2797" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="41.63642114">VCVTPH2PS xmm1, xmm2/mem64,  imm8</text>
<text y="1005952.40198" x="114.6608" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="68.36796516">127                              96</text>
<text y="1005952.40198" x="194.2803" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="67.9473277">95                                64</text>
<text y="1005952.40198" x="273.8998" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="33.10530496">63           48</text>
<text y="1005952.40198" x="313.6798" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="33.16549156">47           32</text>
<text y="1005952.40198" x="353.52" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="33.10530496">31           16</text>
<text y="1005952.40198" x="393.3" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="32.7448541">15             0</text>
<text y="1005961.76188" x="443.039" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="41.8865299">xmm2/mem64</text>
<text y="1005961.76198" x="285.06" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VH3</text>
<text y="1005961.76198" x="324.9" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VH2</text>
<text y="1005961.76198" x="364.68" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VH1</text>
<text y="1005961.76198" x="404.46" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.89865712">VH0</text>
<text y="1005994.52188" x="359.28" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="21.767487">convert</text>
<text y="1005994.52188" x="399.12" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="21.7073004">convert</text>
<text y="1006003.88198" x="140.4" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="21.7073004">convert</text>
<text y="1006003.88198" x="219.96" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="21.76481204">convert</text>
<text y="1006027.28158" x="114.6608" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="68.36796516">127                              96</text>
<text y="1006027.28158" x="194.2803" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="67.9473277">95                                64</text>
<text y="1006027.28158" x="273.8998" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="67.9473277">63                                32</text>
<text y="1006027.28158" x="353.5193" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="67.52669024">31                                  0</text>
<text y="1006036.64198" x="145.8" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VS3</text>
<text y="1006036.64198" x="225.36" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VS2</text>
<text y="1006036.64198" x="304.98" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VS1</text>
<text y="1006036.64198" x="384.6" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="12.83847052">VS0</text>
<text y="1006036.64228" x="443.039" style="font-size:6.687400pt" lengthAdjust="spacingAndGlyphs" textLength="17.8185773">xmm1</text>
<rect y="1005988.38" x="396.72" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="28.32"></rect>
<rect y="1005997.74" x="217.62" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="28.32"></rect>
<rect y="1005997.74" x="138.0" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="28.32"></rect>
<rect y="1005988.38" x="356.88" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="28.38"></rect>
<rect y="1005955.6822" x="311.3883122" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="39.7784346"></rect>
<rect y="1005955.6822" x="351.1667468" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="39.7784346"></rect>
<rect y="1005955.68" x="311.4" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="39.78"></rect>
<rect y="1005955.68" x="351.18" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="39.78"></rect>
<rect y="1005955.6822" x="390.9451814" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="39.8384182"></rect>
<rect y="1005955.6822" x="271.549894" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="39.8384182"></rect>
<rect y="1005955.68" x="390.96" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="39.84"></rect>
<rect y="1005955.68" x="271.56" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="39.84"></rect>
<rect y="1005955.6822" x="191.9930248" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.5568692"></rect>
<rect y="1006030.50208" x="191.9930248" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.5568692"></rect>
<rect y="1005955.68" x="192.0" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.56"></rect>
<rect y="1006030.5" x="192.0" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.56"></rect>
<rect y="1005955.6822" x="112.376172" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.6168528"></rect>
<rect y="1006030.50208" x="351.1667468" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.6168528"></rect>
<rect y="1006030.50208" x="271.549894" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.6168528"></rect>
<rect y="1006030.50208" x="112.376172" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35997864499" width="79.6168528"></rect>
<rect y="1005955.68" x="112.38" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.62"></rect>
<rect y="1006030.5" x="351.18" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.62"></rect>
<rect y="1006030.5" x="271.56" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.62"></rect>
<rect y="1006030.5" x="112.38" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="9.35999999999" width="79.62"></rect>
<path style="stroke:black" d="M291.468600,1005965.042200 L291.468600,1005983.702210 L152.153586,1005983.702210 L152.153586,1006030.501620 "></path>
<path style="stroke:black" d="M331.247000,1005965.042200 L331.247000,1005993.061705 L231.770405,1005993.061705 L231.770405,1006030.501620 "></path>
<path style="stroke:black" d="M371.085400,1005965.042200 L371.085400,1006002.422167 L311.387239,1006002.422167 L311.387239,1006030.501620 "></path>
<path style="stroke:black" d="M410.863900,1005965.042200 L410.863900,1006011.781663 L390.944174,1006011.781663 L390.944174,1006030.501620 "></path></svg>
<h3>Figure 5-6.  VCVTPH2PS (128-bit Version)</h3>
<p><strong>Operation</strong></p>
<p>vCvt_h2s(SRC1[15:0]) { RETURN Cvt_Half_Precision_To_Single_Precision(SRC1[15:0]); }</p>
<p><strong>VCVTPH2PS (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (4, 128), (8, 256), (16, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 32</p>
<p>k (cid:197) j * 16</p>
<p>IF k1[j] OR *no writemask*</p>
<p>THEN DEST[i+31:i] (cid:197)</p>
<p>vCvt_h2s(SRC[k+15:k])</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+31:i] remains unchanged*</p>
<p>ELSE</p>
<p>; zeroing-masking</p>
<p>DEST[i+31:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>VCVTPH2PS (VEX.256 encoded version)</strong></p>
<p>DEST[31:0] (cid:197)vCvt_h2s(SRC1[15:0]);</p>
<p>DEST[63:32] (cid:197)vCvt_h2s(SRC1[31:16]);</p>
<p>DEST[95:64] (cid:197)vCvt_h2s(SRC1[47:32]);</p>
<p>DEST[127:96] (cid:197)vCvt_h2s(SRC1[63:48]);</p>
<p>DEST[159:128] (cid:197)vCvt_h2s(SRC1[79:64]);</p>
<p>DEST[191:160] (cid:197)vCvt_h2s(SRC1[95:80]);</p>
<p>DEST[223:192] (cid:197)vCvt_h2s(SRC1[111:96]); DEST[255:224] (cid:197)vCvt_h2s(SRC1[127:112]);</p>
<p>DEST[MAX_VL-1:256] (cid:197) 0</p>
<p><strong>VCVTPH2PS (VEX.128 encoded version)</strong></p>
<p>DEST[31:0] (cid:197)vCvt_h2s(SRC1[15:0]);</p>
<p>DEST[63:32] (cid:197)vCvt_h2s(SRC1[31:16]);</p>
<p>DEST[95:64] (cid:197)vCvt_h2s(SRC1[47:32]); DEST[127:96] (cid:197)vCvt_h2s(SRC1[63:48]);</p>
<p>DEST[MAX_VL-1:128] (cid:197) 0</p>
<p><strong>Flags Affected</strong></p>
<p>None</p>
<p><strong>Intel C/C++ Compiler Intrinsic Equivalent</strong></p>
<p>VCVTPH2PS __m512 _mm512_cvtph_ps( __m256i a);</p>
<p>VCVTPH2PS __m512 _mm512_mask_cvtph_ps(__m512 s, __mmask16 k, __m256i a);</p>
<p>VCVTPH2PS __m512 _mm512_maskz_cvtph_ps(__mmask16 k, __m256i a);</p>
<p>VCVTPH2PS __m512 _mm512_cvt_roundph_ps( __m256i a, int sae);</p>
<p>VCVTPH2PS __m512 _mm512_mask_cvt_roundph_ps(__m512 s, __mmask16 k, __m256i a, int sae);</p>
<p>VCVTPH2PS __m512 _mm512_maskz_cvt_roundph_ps( __mmask16 k, __m256i a, int sae);</p>
<p>VCVTPH2PS __m256 _mm256_mask_cvtph_ps(__m256 s, __mmask8 k, __m128i a);</p>
<p>VCVTPH2PS __m256 _mm256_maskz_cvtph_ps(__mmask8 k, __m128i a);</p>
<p>VCVTPH2PS __m128 _mm_mask_cvtph_ps(__m128 s, __mmask8 k, __m128i a);</p>
<p>VCVTPH2PS __m128 _mm_maskz_cvtph_ps(__mmask8 k, __m128i a);</p>
<p>VCVTPH2PS __m128 _mm_cvtph_ps ( __m128i m1);</p>
<p>VCVTPH2PS __m256 _mm256_cvtph_ps ( __m128i m1)</p>
<p><strong>SIMD Floating-Point Exceptions</strong></p>
<p>Invalid</p>
<p><strong>Other Exceptions</strong></p>
<table class="exception-table">
<tr>
<td>VEX-encoded instructions, see Exceptions Type 11 (do not report #AC);</td></tr>
<tr>
<td>EVEX-encoded instructions, see Exceptions Type E11.</td></tr>
<tr>
<td>If VEX.W=1.</td></tr>
<tr>
<td>If VEX.vvvv != 1111B or EVEX.vvvv != 1111B.</td></tr></table></body></html>